﻿' Copyright (C) 2015 HTTPBuilder
'
' This program is free software: you can redistribute it and/or modify it under the +terms 
' of the GNU General Public License as published by the Free Software Foundation, either 
' version 3 of the License, or (at your option) any later version.

' This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY;
' without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
' See the GNU General Public License for more details.

' You should have received a copy of the GNU General Public License along with this program.
' If not, see http://www.gnu.org/licenses/. 

Namespace Extensability
    ''' <summary>
    ''' 
    ''' </summary>
    ''' <param name="content"></param>
    ''' <remarks></remarks>
    Public Delegate Sub SetActiveContent(content As String)

    ''' <summary>
    ''' 
    ''' </summary>
    ''' <remarks></remarks>
    <AttributeUsage(AttributeTargets.Class, AllowMultiple:=False)>
    Public Class ToolAddinAttribute
        Inherits Attribute

        Private _invoker As SetActiveContent
        Private _id As Guid
        Private _commandTitle As String

        Public Sub New(id As Guid, commandTitle As String, commandInvoke As SetActiveContent)
            _id = id
            _commandTitle = commandTitle
            _invoker = commandInvoke
        End Sub

        Protected ReadOnly Property Invoker As SetActiveContent
            Get
                Return _invoker
            End Get
        End Property

        Protected ReadOnly Property CommandTitle As String
            Get
                Return _commandTitle
            End Get
        End Property
    End Class
End Namespace
